package org.tgcloud.group.core.ExportUtils.test;

import java.io.File;

/**
 * @className: ExcelDataEntry
 * @description: [描述说明该类的功能]
 * @author: [姓名]
 * @version: [v1.0]
 * @createTime: [2023/9/20 14:02]
 * @updateUser: [姓名]
 * @updateTime: [2023/9/20 14:02]
 * @updateRemark: [描述说明本次修改内容]
 */
public class ExcelDataEntry {
    private Integer row;
    private Integer col;
    private Object data;
    private String dataType;


    public Integer getRow() {
        return row;
    }

    public void setRow(Integer row) {
        this.row = row;
    }

    public Integer getCol() {
        return col;
    }

    public void setCol(Integer col) {
        this.col = col;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
        if (data instanceof String){
            setDataType("String");
        }else if (data instanceof Double){
            setDataType("Double");
        }else if (data instanceof Integer){
            setDataType("Integer");
        }else if (data instanceof File){
            setDataType("File");
        }else if (data instanceof Boolean){
            setDataType("Boolean");
        }else {
            setDataType("String");
        }
    }

    public String getDataType() {
        return dataType;
    }

    public void setDataType(String dataType) {
        this.dataType = dataType;
    }


    @Override
    public String toString() {
        return "ExcelDataEntry{" +
                "row=" + row +
                ", col=" + col +
                ", data=" + data +
                ", dataType='" + dataType + '\'' +
                '}';
    }
}